<?php
/**
 * Created by PhpStorm.
 * User: tengwei
 * Date: 2018/11/22
 * Time: 9:49 AM
 */
namespace common\logics\finance;

use common\widgets\Request;
use common\widgets\Tool;
use phpDocumentor\Reflection\DocBlock\Tags\Var_;
use yii\base\BaseObject;
use Yii;

class FinanceLogic extends BaseObject implements IFinance
{
    /** @var \common\sources\write\financeconfig\FinanceConfigAccess $WFinanceConfigAccess */
    private $WFinanceConfigAccess;

    public function init()
    {
        $this->WFinanceConfigAccess = Yii::$container->set('WFinanceConfigAccess');
        parent::init();
    }

    public function RefundConfig($data) {
        if (empty($data['config_name'])) {
            return Tool::returnJson([],401,'缺少参数');
        }
        if (empty($data['config_value'])) {
            return Tool::returnJson([],401,'缺少参数');
        }
        $result = $this->WFinanceConfigAccess->RefundConfig($data);
        return $result;
    }
}